/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

package cn.webrx;

import java.util.Arrays;

/**
 * <p>Project: jse2303 - Ex1</p>
 * <p>Powered by webrx On 2023-07-28 08:59:13</p>
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Ex1 {
    public static void main(String[] args) {
        //要求利用反射技术，打印出String类的所有方法？

        Arrays.stream(String.class.getMethods()).forEach(m -> System.out.println(m.getName()));

        //
        //Class<String> c = String.class;
        //
        ////Method类的数组
        //Method[] ms = c.getMethods();
        ////System.out.println(ms.length);
        //
        //Method[] dms = c.getDeclaredMethods();
        ////System.out.println(dms.length);
        //for (Method m : ms) {
        //    //System.out.println(m.getName() + ":" + m.getModifiers() + ":" + Arrays.toString(m.getTypeParameters()));
        //    System.out.println("String." + m.getName() + "(" + Arrays.toString(m.getParameters()) + ")");
        //}
    }
}
